import java.io.File;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;


public class Main extends BasicGame{
	final static String VERSION = "0.0.1a";
	public Player player;
	public static int ResX = 800,ResY = 600; // nutno nechat statické
	public static boolean isFullScreen;//p�idal "james"
	
	public Main(String title) {
		super(title);
		
		this.isFullScreen = false;//p�idal "james"
	}

	@Override
	public void render(GameContainer con, Graphics g) throws SlickException {
		player.drawPlayer(g,con.getInput());
	}

	@Override
	public void init(GameContainer con) throws SlickException {
		player = new Player(50,50);
		
	}

	@Override
	public void update(GameContainer con, int delta) throws SlickException {
		player.movePlayer(con.getInput(),delta);
		
	}
	
	//////// Main /////
	public static void main(String[] args){
		// nemazat
		System.setProperty("org.lwjgl.librarypath", new File("Natives/").getAbsolutePath());
		System.out.println("Natives: " + new File("Natives").getAbsolutePath());
		//
		try {
			AppGameContainer app = new AppGameContainer(new Main("Wilder " + VERSION));
			app.setDisplayMode(ResX,ResY,isFullScreen); //upravil "Rydlobeton"
			app.start();
		} catch (SlickException e) {e.printStackTrace();}
	}
}
